<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.jxLC.Action.*"%>
<%@ page language="java" import="com.jxLC.Model.*" %>
<%@ page language="java" import="com.jxLC.Service.*" %>
<%@include file="/checkuLoginSession.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
FilesService filesService=new FilesService();
List<Files> files=filesService.getfile();
User user=(User)session.getAttribute("us");
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>:::江西低碳-企业用户平台:::</title>
	<link href="/mycss/my.css"  rel="stylesheet" type="text/css" />
	<link href="/mycss/details.css"  rel="stylesheet" type="text/css" />
	<link href="/mycss/default.css"  rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="/Kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="/Kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="/Kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="/Kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="/Kindeditor/plugins/code/prettify.js"></script>
	<script type="text/javascript" src="/myjs/jquery.js"></script>
	<script type="text/javascript" src="/myjs/my.js"></script>
	<script type="text/javascript" src="/myjs/jiaoyan.js"></script>
	<script type="text/javascript" src="/myjs/glDatePicker.js"></script>
	<script language="javascript" src="/myjs/Calendar3.js"></script> 
	<style type="text/css">
	 table,td,th{ font-size:12px； font-family: "宋体 "; border:1px solid #339966;border-collapse:collapse; }
	 th{background:#66FFFF;}
	 #m{background-color:white}
	 #ma{height:30px; background-image:url(/my.photo/photo/h3.jpg); color:white;padding-top:5px;}
	 #mb{float: left; width:240px;height:100%; background-color: ; margin:3px;}
	 #mb2{height:30px;background-color:#339966;width:220px; color:white; padding:4px;margin-top:2px;font-weight: bold; }
	 #mb3 a{ text-decoration: none; color:#006699;font-size:14px; font-weight: bold;}
	 #mb3 a:hover{color:green}
	 #mc{float: left;}
	 #mc1{height:10px;background-color: #339966; width:98%;padding-left:4px;margin-top:4px;overflow:hidden;}
	 #mc2{padding-left:10px;margin-top:30px;border-bottom:1px dashed green;width:98%;}
	 #mc5{margin-top:40px;}
	 table{ font-size:12px;font-family:"宋";}
	 table caption {font-weight:bold;font-size:16px;color:black;}
	 table select{width:130px;}
	.tcolumn{background:#EBFCF3; font-size:12px;font-weight: bold;width:150px;height:10px;}
	.tcolumn1{background:#EBFCF3; font-size:14px;font-weight: bold;height:40px;}
    </style>
    <script type="text/javascript">
        var result ="<%=request.getAttribute("msg")%>";
        $(function()
            {
		      $("#date1").glDatePicker();
            });
         KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="CFC_text"]', {
				cssPath : '/Kindeditor/plugins/code/prettify.css',
				uploadJson : 'ImgUploadAction!uploadImage',
				fileManagerJson : '/Kindeditor/jsp/file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				}
			});
			prettyPrint();
		});

         $(function(){
     		$(".add").click(function (){
     			 $(".srow").append($(this).parent("p").clone(true));
     		});
     		
     		$(".mul").click(function (){
     		if(confirm("确认删除？")) {
     			var si = $(".myp").size();
     			if(si > 1){
     				$(this).parent().remove();
     			}else {
     				alert("最后一条了哦~");
     			}
     		}		 
     		return false;
     	});
     	});
	</script>
  </head>
  
 <body style="background-color:#EBFCF3">
    <s:include value="/admin/header.jsp"></s:include>
	<center><div id="m" >
       <s:include value="/user/userleft.jsp"></s:include>
       <div id="mc">
          <div id="mc1"></div>
          <div id="mc2">
           <h4 align="left"><img  src="/my.photo/photo/to.gif"><font style="color:black;font-family: 仿宋 ;font-weight: bold;">当前用户：</font><font style="color:blue;font-family: 仿宋 ;font-weight: bold;">企业用户</font></h4>
           <h4 align="left"><img  src="/my.photo/photo/to.gif"><font style="color:black;font-family: 仿宋 ;font-weight: bold;">当前位置：</font><font style="color:blue;font-family: 仿宋 ;font-weight: bold;">文件上传</font></h4>
          </div>
          <div id="mc5"><font style="font-size:16px; font-weight:bold">==上传文件==</font></div>
          <div id="mc3">
           <form action="tijiao" method="post" name="form1" onsubmit="return checkForm();"  enctype="multipart/form-data">
           <table  width="680">
              <tr>
                 <td class="tcolumn" align="center" >所属类别</td>
                 <td >
                 <select name="CFile_id">
                 <%
                 for(Files f : files){
                 %>
                  <option value="<%=f.getCFile_id() %>"><%=f.getCFile_topic() %></option>
                  <%
                  }
                  %>
                  </select>
                </td>
              </tr>
              <tr>
                 <td class="tcolumn" align="center">项目名称</td>
                 <td >
                  <input type="text"  class="gldp"  name="CFC_topic"  size="22"  ><span ></span>
                 </td>
              </tr>
              
              <tr>
                 <td class="tcolumn" align="center">行业分类</td>
                 <td >
                  <input type="text"  class="gldp"  name="CFC_type" size="22"  ><span ></span>
                 </td>
              </tr>
              
              <tr>
                 <td class="tcolumn" align="center">国家/地区</td>
                 <td >
                  <input type="text"  class="gldp"  name="CFC_place"  size="22"  ><span ></span>
                 </td>
              </tr>
              
              <tr>
                 <td class="tcolumn" align="center">合作方式</td>
                 <td >
                  <input type="text"  class="gldp"  name="CFC_cooperation"  size="22"  ><span ></span>
                 </td>
              </tr>
              
             <tr>
                  <td class="tcolumn" align="center">上传日期</td>
                  <td >
                  <input type="text"  onclick="new Calendar().show(this);" readonly="readonly" name="CFC_time" size="22" ><span ></span>
                  </td>
             </tr>
             <tr >
				<td class="tcolumn" align="center">附件上传：</td>
				<td >		
					<s:if test="annexlist != null">
						<s:iterator value="annexlist" id="annexval">
						<p class="myp picFrame">
							<a href="#" class="mul" title="${annexval.link }  ${annexval.def1 }  点击删除" >
								<img class="annexPicSrc" src="${annexval.anneroute }" width="126" height="90"  />
							</a>
							<input type="hidden"  value="${annexval.pkArticleAnnex }" name="pkArticleAnnex"/>
							<input type="hidden" name="annexlink"  size="40" value="${annexval.link }" />
							<input type="hidden"  name="def1" size="30" value="${annexval.def1 }" />
						</p>
						</s:iterator>
					</s:if>
					<p style="float:left;width:100%;">
						<span class="red" id="ann1" style="display:none">图片为584x400px最佳</span>
					</p>
					<br/>
					<p class="myp">
						<input type="file" name="annex" value="" ;"/>&nbsp;&nbsp;
						<a  class="add">增行</a>&nbsp;&nbsp;<a  class="mul">删行</a><br/><br/>
					</p>
					
					<p class="srow"></p>
				</td>
			</tr>
            <tr>
                  <td class="tcolumn" align="center">项目概述</td>
                  <td align="center">
                   <input type="hidden" class="gldp" name="CNum" value="<%=user.getCnum() %>" />
		          <textarea id="content1" name="CFC_text" style="width:520;height:200px;visibility:hidden;"></textarea>
                  </td>
            </tr>
      <tr>
       <td colspan="2" align="center" class="tcolumn1">
        <input type="submit" style="width:60px;font-weight: bold"  id="send" value="提交">
        <input type="reset" style="width:60px;font-weight: bold"  value="清除">
       </td>
       </tr>
  </table  >
  </form>
          </div>
       </div>
	</div></center>
	<s:include value="/admin/tail.jsp"></s:include>
</body>
</html>
